package jp.ac.u_tokyo.dch.model.xml;

import org.apache.commons.lang.xwork.StringUtils;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Text;

@Root(name= "item")
public class Item{

	@Attribute(name="rowspan", required=false)
	private String rowspan;
	@Attribute(name="colspan", required=false)
	private String colspan;
	@Text
	private String value;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getRowspan() {

		if (StringUtils.isEmpty(rowspan)) {
			return "0";
		}

		return rowspan;
	}

	public void setRowspan(String rowspan) {
		this.rowspan = rowspan;
	}

	public String getColspan() {

		if (StringUtils.isEmpty(colspan)) {
			return "0";
		}

		return colspan;
	}

	public void setColspan(String colspan) {
		this.colspan = colspan;
	}

}